package com.dxf.hchat.service;

import com.dxf.hchat.pojo.TbUser;
import com.dxf.hchat.pojo.vo.Result;
import com.dxf.hchat.pojo.vo.User;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface UserService {
    public List<TbUser> findAll();

    /**
     * 登录
     * @param username
     * @param password
     * @return
     */
   public User login(String username, String password);

   public Result register(TbUser tbUser);

    User upload(MultipartFile file, String userId);

    User updateNickname(String id, String nickname);

    User findById(String userId);

    /**
     * 根据名称收缩朋友
     * 在收缩的时候不尽兴校验
     * @param userId
     * @param friendUsername
     * @return
     */
    User findByUsername(String userId, String friendUsername);
}
